include:
  - apache.install
/etc/sysconfig/httpd:
  file.managed:
    - source: salt://apache/files/httpd-sysconfig
    - user: root
    - group: root
    - mode: 644
apache-init:
  file.managed:
    - name: /etc/init.d/httpd
    - source: salt://apache/files/httpd-init
    - user: root
    - group: root
    - mode: 744
  cmd.run:
    - name: chkconfig --add httpd
    - unless: chkconfig --list|grep httpd
    - require:
      - file: apache-init
/usr/local/httpd24/conf/httpd.conf:
  file.managed:
    - source: salt://apache/files/httpd.conf
    - user: root
    - group: root
    - mode: 644
apache-service:
  service.running:
    - name: httpd
    - enable: True
    - reload: True
    - require:
      - cmd: apache24-install
    - watch:
      - file: /usr/local/httpd24/conf/httpd.conf
